package com.wind.taobao.api.trade.user.rest
{
	import com.wind.taobao.core.exception.InvalidRequestParametersException;
	import com.wind.taobao.core.util.TaobaoUtils;
	import com.wind.taobao.core.webservice.TaobaoRequest;

	/**
	 * taobao.user.get Request
	 * @author fxy
	 *
	 */
	public class UserGetRequest extends TaobaoRequest
	{
		public override function get method():String
		{
			return "taobao.user.get"
		}
		/**
		 * Y	隐私数据须用户登录, 需返回的字段列表。可选值：User结构体中的所有字段；以半角逗号(,)分隔。不支持:location.address,real_name,id_card,phone,mobile,email
		 */
		[Bindable]
		public var fields:String="user_id,nick,sex,buyer_credit,seller_credit,location,created,last_visit";
		/**
		 * Y	 用户昵称
		 */
		[Bindable]
		public var nick:String;

		public override function validate():void
		{
			if (!TaobaoUtils.hasValue(fields))
			{
				throw new InvalidRequestParametersException("请求参数[fields]不能为空");
			}
			if (!TaobaoUtils.hasValue(nick))
			{
				throw new InvalidRequestParametersException("请求参数[nick]不能为空");
			}
		}
	}
}